<template>
  <div>
    <a-row>
      <a-col :span="24">
        <h1>{{caption}}</h1>
      </a-col>
    </a-row>
    <c-table :data="data" :columns="columns"></c-table>
  </div>
</template>

<script>
import CTable from '@/components/Table'

const columns = [
  {
    title: '姓名',
    dataIndex: 'name',
    scopedSlots: { customRender: 'name' }
  },
  {
    title: '年龄',
    dataIndex: 'age'
  },
  {
    title: '地址',
    dataIndex: 'address'
  }
]
const data = [
  {
    key: '1',
    name: '李雷',
    age: 32,
    address: '北京三里屯1号大宅院'
  },
  {
    key: '2',
    name: '韩梅梅',
    age: 42,
    address: '北京三里屯2号大宅院'
  },
  {
    key: '3',
    name: '康康',
    age: 32,
    address: '北京三里屯12号大宅院'
  },
  {
    key: '4',
    name: '马儿扎哈',
    age: 99,
    address: '北京三里屯13号大宅院'
  }
]

export default {
  name: 'User',
  data () {
    return {
      caption: 'new Data Window use Vuejs',
      columns,
      data
    }
  },
  components: {
    CTable
  }
}
</script>

<style scoped>

</style>
